(bug 13708) Don't set "Search results" title when loading Special:Search without...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Apr 2008 18:37:05 +0000 (18:37 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Apr 2008 18:37:05 +0000 (18:37 +0000)
RELEASE-NOTES
includes/SpecialSearch.php

index ada58b7..2a53a28 100644 (file)
@@ -72,7 +72,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Automatically add old redirects to the redirect table when needed
 * (bug 6934) Allow separated inclusions, links, redirects on whatlinkshere
 * Add a footer (emailuser-footer) to the bottom of messages sent with
-Special:EmailUser
+  Special:EmailUser
 * Cache image redirects
 
 === Bug fixes in 1.13 ===
@@ -177,6 +177,8 @@ Special:EmailUser
 * Hide (undo) link if user isn't able to edit page
 * Invalidate cache of pages that includes images via redirects on upload
 * (bug 13705) Don't show rollback link in page history if called with dir=prev
+* (bug 13708) Don't set "Search results" title when loading Special:Search
+  without query
 
 === API changes in 1.13 ===
 
index b16ceb1..5b642bf 100644 (file)
@@ -261,8 +261,9 @@ class SpecialSearch {
         */
        function setupPage( $term ) {
                global $wgOut;
-               $wgOut->setPageTitle( wfMsg( 'searchresults' ) );
-               $subtitlemsg = ( Title::newFromText($term) ? 'searchsubtitle' : 'searchsubtitleinvalid' );
+               if( !empty( $term ) )
+                       $wgOut->setPageTitle( wfMsg( 'searchresults' ) );
+               $subtitlemsg = ( Title::newFromText( $term ) ? 'searchsubtitle' : 'searchsubtitleinvalid' );
                $wgOut->setSubtitle( $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ) );
                $wgOut->setArticleRelated( false );
                $wgOut->setRobotpolicy( 'noindex,nofollow' );